import { createRouter, createWebHistory } from 'vue-router'
import LayOut from '@/LayOut/index.vue'

// 静态路由
const routes = [
  {
    path: '/',
    name: 'LayOut',
    component: LayOut,
    children: [
      {
        path: "/",
        redirect: '/TaskInformation'
      },
      {
        path: '/TaskInformation',
        name: "任务信息",
        component: () => import("@/views/TaskInformation/index.vue")
      },
      {
        path: '/CustomerInformation',
        name: "客户信息",
        component: () => import("@/views/CustomerInformation/index.vue")
      },
      {
        path: '/CustomerFollowUp',
        name: "客户跟进",
        component: () => import("@/views/CustomerFollowUp/index.vue")
      },
      {
        path: '/ProductInformation',
        name: "产品信息",
        component: () => import("@/views/ProductInformation/index.vue")
      },
      {
        path: '/ParameterConfiguration',
        name: "参数配置",
        component: () => import("@/views/ParameterConfiguration/index.vue")
      }
    ]
  },
  {
    path: '/LoginPage',
    name: '登录',
    component: () => import('@/views/LoginPage/index.vue')
  },
  {
    path:'/:pathMatch(.*)*', 
    name: '404',
    component: () => import('@/views/NotFound.vue')
  }
]
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: routes
})

export default router
